import { BaseWindow } from "../../../../../component/window/BaseWindow";
import { ILayer } from "../../../../../mvc/interfaces/ILayer";
import { Language } from "../../../../../../extend/language/Language";
import { GameController } from "../../../../mvc/GameController";
import { EventName } from "../../../../mvc/EventName";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { RuneGetSubWin } from "./RuneGetSubWin";
import { ObjCreate } from "../../../common/ObjCreate";
import { Lv70DramaItem } from "../../../lv70fb/data/Lv70DramaItem";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
//class RuneGetWindow
    
    export  class RuneGetWindow extends BaseWindow
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            this.setSize(430, 375);
            this.titleHeight = 27;
            this.title = Language.getString(80261);
            this.layer = GameController.skill.view as BaseWindow;
            this.updateView();
            return;
        }

        /* internal  */updateView(): void
        {
            var loc1=Language.getStringByParam(80265, EventName.RuneGetGuildShop);
            this._subWin1.updateView(ImagesConst.runeGetGongXianIcon1, ImagesConst.runeGetGongXianIcon2, loc1, Language.getString(80262));
            loc1 = Language.getStringByParam(80266, EventName.RuneGetArena);
            this._subWin2.updateView(ImagesConst.runeGet3v3Icon1, ImagesConst.runeGet3v3Icon2, loc1, Language.getString(80263));
            this._subWin2.showFlyFoot();
            loc1 = Language.getStringByParam(80267, EventName.RuneGetShopMall);
            this._subWin3.updateView(ImagesConst.runeGetShopIcon1, ImagesConst.runeGetShopIcon2, loc1, Language.getString(80264));
            this._txtTips1.htmlText = Language.getString(80268);
            this._txtTips2.htmlText = Language.getString(80269);
            return;
        }

        protected /* override */ createChildren(): void
        {
            var loc2=null;
            super.createChildren();
            this._subWin1 = new RuneGetSubWin();
            this._subWin1.x = 16;
            this._subWin1.y = 37;
            this.addChild(this._subWin1);
            this._subWin2 = new RuneGetSubWin();
            this._subWin2.x = 147;
            this._subWin2.y = 37;
            this.addChild(this._subWin2);
            this._subWin3 = new RuneGetSubWin();
            this._subWin3.x = 278;
            this._subWin3.y = 37;
            this.addChild(this._subWin3);
            this._txtTips1 = ObjCreate.createGTextField("", 26, 310, 100, 20, this);
            this._txtTips2 = ObjCreate.createGTextField("", 141, 313, 240, 60, this);
            this._txtTips2.wordWrap = true;
            var loc1=this._txtTips2.defaultTextFormat;
            loc1.leading = 5;
            this._txtTips2.defaultTextFormat = loc1;
            this._txtTips2.textColor = 65280;
            this._txtTips2.multiline = true;
            loc2 = new Lv70DramaItem();
            loc2.itemCode = 14117300;
            loc2.x = 55;
            loc2.y = 310;
            this.addChild(loc2);
            loc2 = new Lv70DramaItem();
            loc2.itemCode = 14117400;
            loc2.x = 96;
            loc2.y = 310;
            this.addChild(loc2);
            return;
        }

        /* internal */ /* var */_subWin1: RuneGetSubWin;

        /* internal */ /* var */_subWin2: RuneGetSubWin;

        /* internal */ /* var */_subWin3: RuneGetSubWin;

        /* internal */ /* var */_txtTips1: GTextFiled;

        /* internal */ /* var */_txtTips2: GTextFiled;
    }
